home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / docshell / nsIGlobalHistory2.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  5KB  |  147 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIGlobalHistory2.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIGlobalHistory2_h__
  6. #define __gen_nsIGlobalHistory2_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIURI; /* forward declaration */
  18.  
  19. // nsIObserver topic to fire when you add new visited URIs to the history;
  20. // the nsIURI is the subject
  21. #define NS_LINK_VISITED_EVENT_TOPIC "link-visited"
  22.  
  23. /* starting interface:    nsIGlobalHistory2 */
  24. #define NS_IGLOBALHISTORY2_IID_STR "cf777d42-1270-4b34-be7b-2931c93feda5"
  25.  
  26. #define NS_IGLOBALHISTORY2_IID \
  27.   {0xcf777d42, 0x1270, 0x4b34, \
  28.     { 0xbe, 0x7b, 0x29, 0x31, 0xc9, 0x3f, 0xed, 0xa5 }}
  29.  
  30. class NS_NO_VTABLE nsIGlobalHistory2 : public nsISupports {
  31.  public: 
  32.  
  33.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IGLOBALHISTORY2_IID)
  34.  
  35.   /**
  36.      * Add a URI to global history
  37.      *
  38.      * @param aURI      the URI of the page
  39.      * @param aRedirect whether the URI was redirected to another location;
  40.      *                  this is 'true' for the original URI which is
  41.      *                  redirected.
  42.      * @param aToplevel whether the URI is loaded in a top-level window
  43.      * @param aReferrer the URI of the referring page
  44.      *
  45.      * @note  Docshell will not filter out URI schemes like chrome: data:
  46.      *        about: and view-source:.  Embedders should consider filtering out
  47.      *        these schemes and others, e.g. mailbox: for the main URI and the
  48.      *        referrer.
  49.      */
  50.   /* void addURI (in nsIURI aURI, in boolean aRedirect, in boolean aToplevel, in nsIURI aReferrer); */
  51.   NS_IMETHOD AddURI(nsIURI *aURI, PRBool aRedirect, PRBool aToplevel, nsIURI *aReferrer) = 0;
  52.  
  53.   /**
  54.      * Checks to see whether the given URI is in history.
  55.      *
  56.      * @param aURI the uri to the page
  57.      * @return true if a URI has been visited
  58.      */
  59.   /* boolean isVisited (in nsIURI aURI); */
  60.   NS_IMETHOD IsVisited(nsIURI *aURI, PRBool *_retval) = 0;
  61.  
  62.   /**
  63.      * Set the page title for the given uri. URIs that are not already in
  64.      * global history will not be added.
  65.      *
  66.      * @param aURI    the URI for which to set to the title
  67.      * @param aTitle  the page title
  68.      */
  69.   /* void setPageTitle (in nsIURI aURI, in AString aTitle); */
  70.   NS_IMETHOD SetPageTitle(nsIURI *aURI, const nsAString & aTitle) = 0;
  71.  
  72. };
  73.  
  74. /* Use this macro when declaring classes that implement this interface. */
  75. #define NS_DECL_NSIGLOBALHISTORY2 \
  76.   NS_IMETHOD AddURI(nsIURI *aURI, PRBool aRedirect, PRBool aToplevel, nsIURI *aReferrer); \
  77.   NS_IMETHOD IsVisited(nsIURI *aURI, PRBool *_retval); \
  78.   NS_IMETHOD SetPageTitle(nsIURI *aURI, const nsAString & aTitle); 
  79.  
  80. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  81. #define NS_FORWARD_NSIGLOBALHISTORY2(_to) \
  82.   NS_IMETHOD AddURI(nsIURI *aURI, PRBool aRedirect, PRBool aToplevel, nsIURI *aReferrer) { return _to AddURI(aURI, aRedirect, aToplevel, aReferrer); } \
  83.   NS_IMETHOD IsVisited(nsIURI *aURI, PRBool *_retval) { return _to IsVisited(aURI, _retval); } \
  84.   NS_IMETHOD SetPageTitle(nsIURI *aURI, const nsAString & aTitle) { return _to SetPageTitle(aURI, aTitle); } 
  85.  
  86. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  87. #define NS_FORWARD_SAFE_NSIGLOBALHISTORY2(_to) \
  88.   NS_IMETHOD AddURI(nsIURI *aURI, PRBool aRedirect, PRBool aToplevel, nsIURI *aReferrer) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddURI(aURI, aRedirect, aToplevel, aReferrer); } \
  89.   NS_IMETHOD IsVisited(nsIURI *aURI, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsVisited(aURI, _retval); } \
  90.   NS_IMETHOD SetPageTitle(nsIURI *aURI, const nsAString & aTitle) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPageTitle(aURI, aTitle); } 
  91.  
  92. #if 0
  93. /* Use the code below as a template for the implementation class for this interface. */
  94.  
  95. /* Header file */
  96. class nsGlobalHistory2 : public nsIGlobalHistory2
  97. {
  98. public:
  99.   NS_DECL_ISUPPORTS
  100.   NS_DECL_NSIGLOBALHISTORY2
  101.  
  102.   nsGlobalHistory2();
  103.  
  104. private:
  105.   ~nsGlobalHistory2();
  106.  
  107. protected:
  108.   /* additional members */
  109. };
  110.  
  111. /* Implementation file */
  112. NS_IMPL_ISUPPORTS1(nsGlobalHistory2, nsIGlobalHistory2)
  113.  
  114. nsGlobalHistory2::nsGlobalHistory2()
  115. {
  116.   /* member initializers and constructor code */
  117. }
  118.  
  119. nsGlobalHistory2::~nsGlobalHistory2()
  120. {
  121.   /* destructor code */
  122. }
  123.  
  124. /* void addURI (in nsIURI aURI, in boolean aRedirect, in boolean aToplevel, in nsIURI aReferrer); */
  125. NS_IMETHODIMP nsGlobalHistory2::AddURI(nsIURI *aURI, PRBool aRedirect, PRBool aToplevel, nsIURI *aReferrer)
  126. {
  127.     return NS_ERROR_NOT_IMPLEMENTED;
  128. }
  129.  
  130. /* boolean isVisited (in nsIURI aURI); */
  131. NS_IMETHODIMP nsGlobalHistory2::IsVisited(nsIURI *aURI, PRBool *_retval)
  132. {
  133.     return NS_ERROR_NOT_IMPLEMENTED;
  134. }
  135.  
  136. /* void setPageTitle (in nsIURI aURI, in AString aTitle); */
  137. NS_IMETHODIMP nsGlobalHistory2::SetPageTitle(nsIURI *aURI, const nsAString & aTitle)
  138. {
  139.     return NS_ERROR_NOT_IMPLEMENTED;
  140. }
  141.  
  142. /* End of implementation class template. */
  143. #endif
  144.  
  145.  
  146. #endif /* __gen_nsIGlobalHistory2_h__ */
  147.